﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WinFromMediaPlayerDemo.Model.ControlEventArgs;
namespace WinFromMediaPlayerDemo.Controls
{
    public partial class LoaddingDialog : ControlBase
    {

        /// <summary>
        /// 加载完成事件
        /// </summary>
        public event EventHandler OnLoaddingEnd;
        /// <summary>
        /// 加载状态改变事件
        /// </summary>
        public event EventHandler OnLoaddingStateChanged;

        /// <summary>
        /// 加载进度值
        /// </summary>
        private int _LoaddingValue = 0;
        public int LoaddingValue
        {
            get
            {
                return _LoaddingValue;
            }
            set
            {
                _LoaddingValue = value;
                LoaddingStateChangedEventArgs arg = new LoaddingStateChangedEventArgs(_LoaddingValue);
                //if (_LoaddingValue == pgBarLoaddingState.Maximum)
                //{
                    
                //    OnLoaddingEnd(this, arg);
                //}
                //else
                //{
                //    OnLoaddingEnd(this, arg);
                //}
                
            }
        }

        /// <summary>
        /// 加载内容
        /// </summary>
        public string LoaddingContent
        {
            get { return lblContent.Text; }
            set
            {
                this.lblContent.Text = value;
            }
        }


        public LoaddingDialog()
        {
            InitializeComponent();
            
        }
    }
}
